package com.ihg.hiex.admin.entity.dto;

/**
 * 
 * @author houtao
 *
 */
public class FinancialManagement {
    
    private String assessorEvalution;
    
    private String internalBenchmark;
    
    private String externalBenchmark;
    
    private int qssj;
    
    private int zlhjlss;
    
    private int dxwt;
    
    private int fzzysj;
    
    private int tcxf;
    
    private int potential;
    
    /**
     * 
     */
    public FinancialManagement() {
    }
    
    /**
     * 
     * @param qssj
     * @param zlhjlss
     * @param dxwt
     * @param fzzysj
     * @param tcxf
     */
    public FinancialManagement(int qssj, int zlhjlss, int dxwt,
            int fzzysj, int tcxf) {
        this.qssj = qssj;
        this.zlhjlss = zlhjlss;
        this.dxwt = dxwt;
        this.fzzysj = fzzysj;
        this.tcxf = tcxf;
        double po = (qssj + dxwt) * 0.285714
                + (zlhjlss + fzzysj + tcxf) * 0.142857;
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(7.40)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.80)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.40)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(6.00)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.60)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.00)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.60)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.20)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(3.60)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    }
    
    /**
     * 
     * @param assessorEvalution
     * @param internalBenchmark
     * @param externalBenchmark
     * @return
     */
    public FinancialManagement init(String assessorEvalution, String internalBenchmark, String externalBenchmark) {
        this.assessorEvalution = assessorEvalution;
        this.internalBenchmark = internalBenchmark;
        this.externalBenchmark = externalBenchmark;
        return this;
    }
    
    /**
     * 
     * @param qssj
     * @param zlhjlss
     * @param dxwt
     * @param fzzysj
     * @param tcxf
     * @return
     */
    public FinancialManagement init(int qssj, int zlhjlss, int dxwt,
            int fzzysj, int tcxf) {
        this.qssj = qssj;
        this.zlhjlss = zlhjlss;
        this.dxwt = dxwt;
        this.fzzysj = fzzysj;
        this.tcxf = tcxf;
        double po = (qssj + dxwt) * 0.285714
                + (zlhjlss + fzzysj + tcxf) * 0.142857;
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(7.40)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.80)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.40)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(6.00)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.60)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.00)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.60)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.20)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(3.60)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
        
        return this;
    }

	public String getAssessorEvalution() {
		return assessorEvalution;
	}

	public void setAssessorEvalution(String assessorEvalution) {
		this.assessorEvalution = assessorEvalution;
	}

	public String getInternalBenchmark() {
		return internalBenchmark;
	}

	public void setInternalBenchmark(String internalBenchmark) {
		this.internalBenchmark = internalBenchmark;
	}

	public String getExternalBenchmark() {
		return externalBenchmark;
	}

	public void setExternalBenchmark(String externalBenchmark) {
		this.externalBenchmark = externalBenchmark;
	}

	public int getQssj() {
		return qssj;
	}

	public void setQssj(int qssj) {
		this.qssj = qssj;
	}

	public int getZlhjlss() {
		return zlhjlss;
	}

	public void setZlhjlss(int zlhjlss) {
		this.zlhjlss = zlhjlss;
	}

	public int getDxwt() {
		return dxwt;
	}

	public void setDxwt(int dxwt) {
		this.dxwt = dxwt;
	}

	public int getFzzysj() {
		return fzzysj;
	}

	public void setFzzysj(int fzzysj) {
		this.fzzysj = fzzysj;
	}

	public int getTcxf() {
		return tcxf;
	}

	public void setTcxf(int tcxf) {
		this.tcxf = tcxf;
	}

	public int getPotential() {
		return potential;
	}

	public void setPotential(int potential) {
		this.potential = potential;
	}
}
